import Vue from 'vue'

import VueRouter from 'vue-router'
Vue.use(VueRouter)

import main from './router/main.js'
import goods from './router/goods.js'
import download from './router/download.js'
import news from './router/news.js'
import open from './router/open.js'
import about from './router/about.js'
import other from './router/other.js'

let work = [main,goods,download,news,open,about,other]
let routes = []
for(let i=0;i<work.length;i++){

    let name = work[i].name
    let icon = work[i].icon
    let list = work[i].list

    for(let x=0;x<list.length;x++){
    	
    	list[x].meta.index = i
        list[x].meta.category = name
        list[x].meta.category_icon = icon
        routes.push(list[x])
    }
}

export default new VueRouter({
    routes 
})
